package com.mmy.configure;

import java.util.Arrays;
import java.util.List;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.mmy.interceptor.AllInterceptor;

@Configuration
public class AllInterceptorConfigure implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
		List<String> exPath = Arrays.asList("/js/**", "/img/**", "/imges/**", "/css/**", "/*.woff", "/*.ico", "/*.png","/imgs/**",
				"/*.jpg", "/*.jpeg", "/fonts/**");
		registry.addInterceptor(new AllInterceptor()).addPathPatterns("/**").excludePathPatterns(exPath);
    }
}
